home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0175-GetSuperClassTable -Oct89 < prev    next >
Encoding:
Text File  |  1989-10-25  |  2.2 KB  |  86 lines  |  [TEXT/GEOL]

  1. Item    0777796                         25-Oct-89        13:17
  2.  
  3. From:   MADA.EUROPE                     MacApp Dev Assoc Europe, E Carrasco
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.         X0121                           Symantec,Languages Tech Support,VCA
  7.         D0152                           Symantec Mktg, Languages,PRT
  8.  
  9. Sub:    GetSuperClassTable with THINK
  10.  
  11. Attn:  MacApp.Tech and Symantec
  12.  
  13. From:  Eric Carrasco
  14.        MADA Europe
  15.        2, allĂ©e des Acacias
  16.        F-95130 Le Plessis Bouchard
  17.        France
  18.  
  19. Sub:   GetSuperClassTableHandle with THINK Pascal
  20.  
  21.  
  22. Hi all OOP'ers,
  23.  
  24. Many European developers enjoy Think Pascal and would like MADA to provide a
  25. THINK version of MacApp 2.0B9 and next versions. This has been done without
  26. difficulty BUT we have one last problem:
  27.   the procedure %_CLASSINFO is generated by MPW Linker so we get the standard
  28. message from Think Pascal Linker:
  29.           undefined: "%_CLASSINFO" (UObject.p)
  30.  
  31.  
  32. Let's have a look at MacApp source code (file UObject.Globals.p):
  33.  
  34. ---
  35.    PROCEDURE %_CLASSINFO;
  36.    EXTERNAL;
  37.   { Created by linker }   Aaaaaaaarrrrrrrgl!!!
  38. ---
  39.  
  40.  
  41.   This procedure is used in GetSuperClassTableHandle function:
  42.  
  43. ---
  44.  FUNCTION GetSuperClassTableHandle: Handle;
  45.  
  46.  BEGIN
  47.   { Force Jump Table relative }
  48.   GetSuperClassTableHandle := Handle(ord(@%_CLASSINFO) + 2);
  49.   { skip jmp instruction to make PHONY handle }
  50.  END;
  51. ---
  52.  
  53.  
  54.   And finally, a global pSuperClassTable variable is setup.
  55.  
  56. ---
  57. PROCEDURE InitUObject;
  58.  
  59.   BEGIN
  60.   ...
  61.   pSuperClassTable := GetSuperClassTableHandle;
  62.   ...
  63.   END;
  64. ---
  65.  
  66.   pSuperClassTable is used in global procedures (GetClassSizeFromId,
  67. GetClassNameFromID, GetSuperClassID, OrderClassIdsByName, NewObjectByClassId,
  68. OrderClassIdsByName, etc...)
  69. All those procedures are base on method dispatch table. We find them everywhere
  70. in MacApp source code and can't do anything without them.
  71.  
  72.  
  73. My questions are:
  74.   1. Is there any similar method in Think Pascal, I mean a method equivalent to
  75. %_CLASSINFO or to GetSuperClassTableHandle?
  76.  
  77.  2. Is there any way to know how objects are implemented in THINK Pascal?
  78.  
  79.  
  80. Any help will be welcome, we keep on working on this problem.
  81.  
  82. Best Regards,
  83.  
  84. Eric
  85.  
  86.